from flask_script import Manager
from flask_migrate import Migrate, MigrateCommand
from config import DevelopementConfig, ProductionConfig
from info import create_app, db

# 创建迁移对象
app = create_app(ProductionConfig)
manager = Manager(app)
Migrate(app, db)
# 给建议对象增加一个db命令,并创建迁移命令行
manager.add_command('db', MigrateCommand)

@app.route('/')
def index():
    return 'haha'

if __name__ == '__main__':
    print(app.url_map)
    app.run()